package com.yonyou.iuap.jxzy.entity;

import cn.hutool.core.date.DateUtil;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.yonyou.iuap.baseservice.bpm.entity.AbsBpmModel;
import com.yonyou.iuap.baseservice.entity.Model;
import com.yonyou.iuap.persistence.vo.BaseEntity;

import javax.persistence.Column;
import javax.persistence.Table;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;
import java.util.Random;


/**
 * @program: jxProject
 * @description: 用户表实体对象类
 * @author: Pengjx
 * @create: 2019-05-24 13:58
 **/
@JsonIgnoreProperties(ignoreUnknown = true)
@Table(name = "SM_USER")
public class User extends AbsBpmModel implements Serializable {

    @Column(name = "ABLE_TIME")
    @Size(max = 10)
    private String ableTime;


    @Column(name = "AUTHEN_TYPE")
    @Size(max = 100)
    private String authenType;

    @Column(name = "CUSERID")
    @Size(max = 10)
    private String cuserid;


    @Column(name = "DATASTATE")
    @Size(max = 38)
    private Integer datestate;

    @Column(name = "DISABLE_TIME")
    @Size(max = 10)
    private String disableTime;
    @Column(name = "DR")
    @Size(max = 10)
    private String dr;
    @Column(name = "ISCA")
    @Size(max = 38)
    private String isca;

    @Column(name = "KEYUSER")
    @Size(max = 1)
    private String keyuser;
    @Column(name = "LANGCODE")
    @Size(max = 20)
    private String langocode;
    @Column(name = "LOCKED_TAG")
    @Size(max = 1)
    private String lockedTag;

    @Column(name = "PK_CORP")
    @Size(max = 4)
    private String pkCorp;
    @Column(name = "PK_PROJECT")
    @Size(max = 20)
    private String pkProject;
    @Column(name = "PWDLEVELCODE")
    @Size(max = 50)
    private String pwdlevecode;

    @Column(name = "PWDPARAM")
    @Size(max = 50)
    private String pwdparam;
    @Column(name = "PWDTYPE")
    @Size(max = 38)
    private String pwdType;
    @Column(name = "TS")
    @Size(max = 19)
    private String ts;

    @Column(name = "USER_NAME")
    @Size(max = 50)
    private String userName;
    @Column(name = "USER_PASSWORD")
    @Size(max = 50)
    private String userPassword;

    @Column(name = "USER_CODE")
    @Size(max = 10)
    private String userCode;

    @Column(name = "USER_NOTE")
    @Size(max = 50)
    private String userNote;
    
    @Column(name = "ORDER_PASSWORD")
    @Size(max = 50)
    private String orderPassword;


    public String getAbleTime() {
        return ableTime;
    }

    public void setAbleTime(String ableTime) {
        this.ableTime = ableTime;
    }

    public String getAuthenType() {
        return authenType;
    }

    public void setAuthenType(String authenType) {
        this.authenType = authenType;
    }

    public String getCuserid() {
        return cuserid;
    }

    public void setCuserid(String cuserid) {
        this.cuserid = cuserid;
    }

    public Integer getDatestate() {
        return datestate;
    }

    public void setDatestate(Integer datestate) {
        this.datestate = datestate;
    }

    public String getDisableTime() {
        return disableTime;
    }

    public void setDisableTime(String disableTime) {
        this.disableTime = disableTime;
    }

    /*public String getDr() {
        return dr;
    }*/

    public void setDr(String dr) {
        this.dr = dr;
    }

    public String getIsca() {
        return isca;
    }

    public void setIsca(String isca) {
        this.isca = isca;
    }

    public String getKeyuser() {
        return keyuser;
    }

    public void setKeyuser(String keyuser) {
        this.keyuser = keyuser;
    }

    public String getLangocode() {
        return langocode;
    }

    public void setLangocode(String langocode) {
        this.langocode = langocode;
    }

    public String getLockedTag() {
        return lockedTag;
    }

    public void setLockedTag(String lockedTag) {
        this.lockedTag = lockedTag;
    }

    public String getPkCorp() {
        return pkCorp;
    }

    public void setPkCorp(String pkCorp) {
        this.pkCorp = pkCorp;
    }

    public String getPkProject() {
        return pkProject;
    }

    public void setPkProject(String pkProject) {
        this.pkProject = pkProject;
    }

    public String getPwdlevecode() {
        return pwdlevecode;
    }

    public void setPwdlevecode(String pwdlevecode) {
        this.pwdlevecode = pwdlevecode;
    }

    public String getPwdparam() {
        return pwdparam;
    }

    public void setPwdparam(String pwdparam) {
        this.pwdparam = pwdparam;
    }

    public String getPwdType() {
        return pwdType;
    }

    public void setPwdType(String pwdType) {
        this.pwdType = pwdType;
    }

    public String getTs() {
        return ts;
    }

    public void setTs(String ts) {
        this.ts = ts;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserPassword() {
        return userPassword;
    }

    public void setUserPassword(String userPassword) {
        this.userPassword = userPassword;
    }

    public String getUserCode() {
        return userCode;
    }

    public void setUserCode(String userCode) {
        this.userCode = userCode;
    }

    public String getUserNote() {
        return userNote;
    }

    public void setUserNote(String userNote) {
        this.userNote = userNote;
    }

    @Override
    public String getBpmBillCode() {
        return  DateUtil.format(new Date(), "yyyyMMddHHmmss"+new Random().nextInt(10));
    }
}
